package com.vodone.v1pin.productlist.service
{
	import com.vodone.v1pin.ServiceProvider;
	import com.vodone.v1pin.core.service.HttpJsonDelegate;
	import com.vodone.v1pin.productlist.vo.ActivityVO;
	import com.vodone.v1pin.productlist.vo.BrandInfoVO;
	import com.vodone.v1pin.productlist.vo.ProductItemVO;
	import com.vodone.v1pin.productlist.vo.ProductListVO;
	import com.vodone.v1pin.productlist.vo.QueryItemVO;
	
	import flash.utils.setTimeout;
	
	import mx.collections.ArrayCollection;
	import mx.rpc.http.mxml.HTTPService;

	public class ProductListDelegate
	{
		public static function getProductList( resultHandler:Function ,  
											   currentPage:int , pageSize:int, 
											   catetory:String = "" ,
											   keyword:String = "" , sex:String = "" , brand:String = "" , 
											   color:String = "" , price:String = "" , size:String = "" ,
											   property:String = "" , sort:int = 1 , showSellout:Boolean = false,
											   recommendId:String = "" , type:int = 0 , hotId:String = "" , faultHandler:Function = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getProductListService;
			var params:Object = {
				currentPage : currentPage,
				pageSize: pageSize,
				category : catetory,
				keyword : keyword,
				sex : sex,
				brand : brand,
				color : color,
				price : price,
				size : size,
				property : property,
				sort : sort,
				showSellout : showSellout,
				recommendId : recommendId,
				id : hotId,
				type : type 
			}
			
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler );
		}
	}
}